home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d17 / setprint.arc / SETPRINT.DOC < prev   
Text File  |  1988-02-29  |  2KB  |  39 lines

  1. ANOTHER WAY TO SET PRINTER OPTIONS BY PC Magazine-Power User Column Oct.29,1985
  2.  
  3. In a recent Power User column you presented a number of interesting ways to 
  4. send command sequences to the printer. Here's another, which uses DOS's ability
  5. to redirect ECHO statements in batch files to the printer. For example, if your
  6. batch file contains
  7.  
  8.    ECHO string > lpt1
  9.  
  10. the character string "string" will be printed on the default printer. You can
  11. send printer command sequences by specifying them as "string". All you need is
  12. an editor (such as IBM Personal Editor, Microsoft Word, or XyWrite II-Plus) 
  13. that lets you enter the Escape character (ASCII 27) and other nonprinting ASCII
  14. characters.
  15.    The SETPRINT batch program shown is designed to set the options I normally
  16. use with an Okidata Microline printer. If you don't enter any parameters on
  17. SETPRINT's command line, a help screen is presented (see the label :HELP) that
  18. tells you which parameters are valid and what they do.
  19.    SETPRINT will send any number of valid options to your printer. You just 
  20. type in the sequences you want sent.
  21.  
  22.                                                         William Perry
  23.                                                         Blacksburg, Virginia
  24.  
  25. SETPRINT.BAT works fine and demonstrates once again that there are more ways to
  26. set up a printer than to skin the proverbial cat. To show SETPRINT in this col-
  27. umn, all characters that are to be directed to the printer are printed inside
  28. braces ({ }). Except for the Escape character, which is listed as {esc}, non-
  29. printing codes are shown as a-xxx, where the notation xxx represents the ASCII
  30. code, and "a-" means that you should use the Alt key in conjunction with the
  31. numeric keypad to enter the number.
  32.    As an alternative to using an editor to generate the ECHO statements, you
  33. might use a short BASIC program that prints them to a file. Such a program wou-
  34. ld contain statements such as:
  35.  
  36.    PRINT #1, "echo "+chr$(27)
  37.  
  38. where file number 1 is the open file.
  39.